home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / System Extras Headers / GX Printing Libraries / JobFormatModeLibrary.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-17  |  3.4 KB  |  110 lines  |  [TEXT/MMCC]

  1. /* ------------------------------------------------------------------------------
  2.  
  3.     FILENAME
  4.         JobFormatModeLibrary.c
  5.         
  6.     DESCRIPTION
  7.         Handy job format mode functions.
  8.         
  9.     COPYRIGHT
  10.          © Apple Computer, Inc. 1992
  11.          All rights reserved. 
  12.     
  13. -------------------------------------------------------------------------------- */
  14.  
  15.  
  16. #include <PrintingManager.h>
  17. #include <PrintingLibraries.h>
  18.  
  19. /* Wrappers for JobFormatModeQuery() */
  20.  
  21.  
  22. /****************************************************************************************
  23.  
  24.                             GetJobFormatLineConstraint
  25.                             
  26.     function :
  27.                     Returns position constraint table for direct mode line drawing
  28.     parameters :
  29.                     the job and optional handle to hold the position constraint table
  30.                     
  31. ****************************************************************************************/
  32. gxPositionConstraintTableHdl GetJobFormatLineConstraint(gxJob theJob, gxPositionConstraintTableHdl hPositionConstraintTable) {
  33.     
  34.     GXJobFormatModeQuery(theJob, gxGetJobFormatLineConstraintQuery, NULL, &hPositionConstraintTable);
  35.     
  36.     return hPositionConstraintTable;
  37. }
  38.  
  39.  
  40. /****************************************************************************************
  41.  
  42.                             GetJobFormatFonts
  43.                             
  44.     function :
  45.                     Returns font table for direct mode
  46.     parameters :
  47.                     the job and optional handle to hold the font table
  48.                     
  49. ****************************************************************************************/
  50. gxFontTableHdl GetJobFormatFonts(gxJob theJob, gxFontTableHdl hFontTable) {
  51.     
  52.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontsQuery, NULL, &hFontTable);
  53.     
  54.     return hFontTable;
  55. }
  56.  
  57.  
  58. /****************************************************************************************
  59.  
  60.                             GetJobFormatFontCommonStyles
  61.                             
  62.     function :
  63.                     Returns style name table for direct mode
  64.     parameters :
  65.                     the job and optional handle to hold the style name table
  66.                     
  67. ****************************************************************************************/
  68. gxStyleNameTableHdl GetJobFormatFontCommonStyles(gxJob theJob, gxFont theFont, gxStyleNameTableHdl hStyleTable) {
  69.     
  70.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontCommonStylesQuery, theFont, &hStyleTable);
  71.     
  72.     return hStyleTable;
  73. }
  74.  
  75.  
  76. /****************************************************************************************
  77.  
  78.                             GetJobFormatFontConstraint
  79.                             
  80.     function :
  81.                     Returns position constraint table for direct mode fonts
  82.     parameters :
  83.                     the job and optional handle to hold the position constraint table
  84.                     
  85. ****************************************************************************************/
  86. gxPositionConstraintTableHdl GetJobFormatFontConstraint(gxJob theJob, gxFont theFont, gxPositionConstraintTableHdl hPositionConstraintTable) {
  87.     
  88.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontConstraintQuery, theFont, &hPositionConstraintTable);
  89.     
  90.     return hPositionConstraintTable;
  91. }
  92.  
  93.  
  94. /****************************************************************************************
  95.  
  96.                             SetStyleJobFormatCommonStyle
  97.                             
  98.     function :
  99.                     Returns the style with the additional font style information set
  100.     parameters :
  101.                     the job and a style with the font and size values set
  102.                     
  103. ****************************************************************************************/
  104. gxStyle SetStyleJobFormatCommonStyle(gxJob theJob, Str255 theStyleName, gxStyle theStyle) {
  105.     
  106.     GXJobFormatModeQuery(theJob, gxSetStyleJobFormatCommonStyleQuery, theStyleName, theStyle);
  107.     
  108.     return theStyle;
  109. }
  110.